package com.junjie.checkin.request.activity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.junjie.checkin.entity.Enum.ActivityCheckInMethodEnum;
import com.junjie.checkin.entity.Enum.ActivityStatusEnum;
import com.junjie.checkin.entity.Enum.ActivityTypeEnum;
import jakarta.validation.constraints.*;
import lombok.Data;
import org.hibernate.validator.constraints.URL;
import org.springframework.validation.annotation.Validated;

import java.io.Serializable;
import java.util.Date;


@Data
@Validated
public class ActivityRequest implements Serializable {
    @NotEmpty(message = "标题不可未空")
    private String title;                // 活动标题，模糊查询

    private String description;          // 活动描述

    @NotNull(message = "活动类型不可未空")
    private ActivityTypeEnum type;       // 活动类型

    @NotEmpty(message = "开始时间不可未空")
    private String startTime;            // 开始时间

    @NotEmpty(message = "结束时间不可未空")
    private String endTime;              // 结束时间

    @NotEmpty(message = "活动地点不可未空")
    private String location;             // 活动地点

    @Min(value = 2,message = "活动人数范围错误")
    @Max(value = 1000,message = "活动人数范围错误")
    private Integer maxParticipants;           // 活动人数

    @Min(value = 0,message = "活动积分范围错误")
    @Max(value = 1000,message = "活动积分范围错误")
    private Integer point;               // 活动积分

    @NotNull(message = "签到方式不能为空")
    private ActivityCheckInMethodEnum checkInMethod;        // 签到方式

    @URL(message = "错误的URL路径")
    private String poster;               // 活动海报

    @Size(max = 255,message = "活动描述长度不能超过255个字符")
    private String ruleDescription;      // 活动规则

    @NotNull(message = "活动状态不能为空")
    private ActivityStatusEnum status;               // 活动状态

    @Min(value=-180,message = "经度范围错误")
    @Max(value = 180,message = "经度范围错误")
    private Double longitude;      // 签到经度



    @Min(value=-90,message = "纬度范围错误")
    @Max(value = 90,message = "纬度范围错误")
    private Double latitude;         // 签到纬度

    @Min(value = 50,message = "签到半径错误")
    @Max(value = 1000,message = "签到半径错误")
    private Integer checkInRadius;       // 签到半径
}